home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume24 / yabbawhap / part04 < prev    next >
Encoding:
Internet Message Format  |  1991-10-09  |  8.5 KB

  1. Subject:  v24i076:  Public-domain replacement for compress programs, Part04/04
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: cd7a2268 0bc31d04 3e7e4c73 213f0c6d
  5.  
  6. Submitted-by: Dan Bernstein <brnstnd@nyu.edu>
  7. Posting-number: Volume 24, Issue 76
  8. Archive-name: yabbawhap/part04
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # Contents:  FILES FORMLETTER bitout.h texts.h try tryap tryapy
  17. # Wrapped by rsalz@litchi.bbn.com on Wed Mar 20 17:09:25 1991
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. echo If this archive is complete, you will see the following message:
  20. echo '          "shar: End of archive 4 (of 4)."'
  21. if test -f 'FILES' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'FILES'\"
  23. else
  24.   echo shar: Extracting \"'FILES'\" \(238 characters\)
  25.   sed "s/^X//" >'FILES' <<'END_OF_FILE'
  26. XBLURB
  27. XCHANGES
  28. XREADME
  29. XFORMLETTER
  30. XPATENTS
  31. XFILES
  32. XQUESTIONS
  33. Xsysconf
  34. Xcheckconf.c
  35. XMakefile
  36. Xtry
  37. Xtryap
  38. Xtryapy
  39. XINSTALL
  40. Xyabba.1
  41. Xunyabba.1
  42. Xhuptrie.h
  43. Xbitout.h
  44. Xpercent.h
  45. Xtexts.h
  46. Xyw.c
  47. Xunwhap.c
  48. Xunyabba.c
  49. Xbitout.c
  50. Xpercent.c
  51. Xtexts.c
  52. Xycoding.4b
  53. Xycoding.uu
  54. END_OF_FILE
  55.   if test 238 -ne `wc -c <'FILES'`; then
  56.     echo shar: \"'FILES'\" unpacked with wrong size!
  57.   fi
  58.   # end of 'FILES'
  59. fi
  60. if test -f 'FORMLETTER' -a "${1}" != "-c" ; then 
  61.   echo shar: Will not clobber existing file \"'FORMLETTER'\"
  62. else
  63.   echo shar: Extracting \"'FORMLETTER'\" \(572 characters\)
  64.   sed "s/^X//" >'FORMLETTER' <<'END_OF_FILE'
  65. XTo: brnstnd@nyu.edu
  66. XFrom: 
  67. XDate: 
  68. X
  69. XPackage: yabbawhap 1.00
  70. XObtained from (e.g., uunet.uu.net): 
  71. XObtained by (e.g., ftp): 
  72. X
  73. X1. Machine architecture (e.g., Sun 4/280): 
  74. X2. Operating system (e.g., SunOS 4.1): 
  75. X3. OS vendor (e.g., Sun): 
  76. X4. Does yabba work on your machine so far (yes/no)? 
  77. X5. Have you tried compiling whap (yes/no)? 
  78. X6. Does whap work so far, if you've compiled it (yes/no)? 
  79. X7. What are CC and CCOPTS in your Makefile?
  80. X   CC=
  81. X   CCOPTS=
  82. X
  83. X8. Describe any problems you've had with yabbawhap.
  84. X
  85. X
  86. X9. Any further questions, comments, or suggestions?
  87. X
  88. X
  89. XYour name:
  90. END_OF_FILE
  91.   if test 572 -ne `wc -c <'FORMLETTER'`; then
  92.     echo shar: \"'FORMLETTER'\" unpacked with wrong size!
  93.   fi
  94.   # end of 'FORMLETTER'
  95. fi
  96. if test -f 'bitout.h' -a "${1}" != "-c" ; then 
  97.   echo shar: Will not clobber existing file \"'bitout.h'\"
  98. else
  99.   echo shar: Extracting \"'bitout.h'\" \(815 characters\)
  100.   sed "s/^X//" >'bitout.h' <<'END_OF_FILE'
  101. X/* Placed into the public domain by Daniel J. Bernstein. */
  102. X
  103. X/* This is a bit-output library; sorry for the lack of documentation. */
  104. X/* Feel free to use it in other programs requiring fast bit output. */
  105. X/* Outside #defines: BITBUFSIZE, TYPE, BRAINDAMAGED. */
  106. X
  107. X#ifndef BITOUT_H
  108. X#define BITOUT_H
  109. X
  110. X#ifndef BITBUFSIZE
  111. X#define BITBUFSIZE (1000)
  112. X#endif
  113. X
  114. X#ifndef TYPE
  115. X#define TYPE short
  116. X#endif
  117. X
  118. Xtypedef TYPE bitnum; /* must be signed */
  119. Xtypedef unsigned TYPE bitword;
  120. X
  121. Xextern bitword bit_wbuf[];
  122. Xextern bitnum bit_bbuf[];
  123. Xextern int bit_bufsize;
  124. Xextern int bit_printbuf();
  125. Xextern int bit_flushbuf();
  126. Xextern long bit_numout;
  127. Xextern int bit_fillflush();
  128. X
  129. X#define bits_out(n,b) \
  130. X( (bit_wbuf[bit_bufsize] = n), (bit_bbuf[bit_bufsize] = 8 - b), \
  131. X  (bit_bufsize++), ((bit_bufsize == BITBUFSIZE) && bit_printbuf()) )
  132. X
  133. X#endif
  134. END_OF_FILE
  135.   if test 815 -ne `wc -c <'bitout.h'`; then
  136.     echo shar: \"'bitout.h'\" unpacked with wrong size!
  137.   fi
  138.   # end of 'bitout.h'
  139. fi
  140. if test -f 'texts.h' -a "${1}" != "-c" ; then 
  141.   echo shar: Will not clobber existing file \"'texts.h'\"
  142. else
  143.   echo shar: Extracting \"'texts.h'\" \(427 characters\)
  144.   sed "s/^X//" >'texts.h' <<'END_OF_FILE'
  145. X/* Placed into the public domain by Daniel J. Bernstein. */
  146. X
  147. X#ifndef SQ_TEXTS_H
  148. X#define SQ_TEXTS_H
  149. X
  150. Xextern char *sqauthor[];
  151. Xextern char *sqversion[];
  152. Xextern char *sqcopyright[];
  153. Xextern char *sqwarranty[];
  154. Xextern char *squsage[];
  155. Xextern char *sqhelp[];
  156. X
  157. Xextern char *unsqauthor[];
  158. Xextern char *unsqversion[];
  159. Xextern char *unsqcopyright[];
  160. Xextern char *unsqwarranty[];
  161. Xextern char *unsqusage[];
  162. Xextern char *unsqhelp[];
  163. X
  164. X#endif
  165. END_OF_FILE
  166.   if test 427 -ne `wc -c <'texts.h'`; then
  167.     echo shar: \"'texts.h'\" unpacked with wrong size!
  168.   fi
  169.   # end of 'texts.h'
  170. fi
  171. if test -f 'try' -a "${1}" != "-c" ; then 
  172.   echo shar: Will not clobber existing file \"'try'\"
  173. else
  174.   echo shar: Extracting \"'try'\" \(726 characters\)
  175.   sed "s/^X//" >'try' <<'END_OF_FILE'
  176. X#!/bin/csh -f
  177. X# Public domain.
  178. Xdate
  179. Xecho -n '1. yabba time: '
  180. Xtime ./yabba < $1 > try.Y
  181. Xecho -n '2. unyabba time: '
  182. Xtime ./unyabba < try.Y > try.Y.U
  183. Xecho '3. comparing: (should not produce further output)'
  184. Xcmp try.Y.U $1
  185. Xecho -n '4. compress time: '
  186. Xtime compress < $1 > try.Z
  187. Xecho -n '5. uncompress time: '
  188. Xtime uncompress < try.Z > try.Z.U
  189. Xecho '6. comparing: (should not produce further output)'
  190. Xcmp try.Z.U $1
  191. Xecho '7. file sizes:'
  192. Xls -lds $1 try.Y try.Z
  193. Xecho '8. percentages: '
  194. Xecho -n 'Y to original: '; expr `wc -c < try.Y` '*' 100 / `wc -c < $1`
  195. Xecho -n 'Z to original: '; expr `wc -c < try.Z` '*' 100 / `wc -c < $1`
  196. Xecho -n 'Y to Z: '; expr `wc -c < try.Y` '*' 100 / `wc -c < try.Z`
  197. Xrm -f try.Y try.Z try.Y.U try.Z.U
  198. END_OF_FILE
  199.   if test 726 -ne `wc -c <'try'`; then
  200.     echo shar: \"'try'\" unpacked with wrong size!
  201.   fi
  202.   chmod +x 'try'
  203.   # end of 'try'
  204. fi
  205. if test -f 'tryap' -a "${1}" != "-c" ; then 
  206.   echo shar: Will not clobber existing file \"'tryap'\"
  207. else
  208.   echo shar: Extracting \"'tryap'\" \(770 characters\)
  209.   sed "s/^X//" >'tryap' <<'END_OF_FILE'
  210. X#!/bin/csh -f
  211. X# Public domain.
  212. X./whap < /dev/null > /dev/null
  213. Xdate
  214. Xecho -n '1. whap time: '
  215. Xtime ./whap -q < $1 > try.AP
  216. Xecho -n '2. unwhap time: '
  217. Xtime ./unwhap -q < try.AP > try.AP.U
  218. Xecho '3. comparing: (should not produce further output)'
  219. Xcmp try.AP.U $1
  220. Xecho -n '4. compress time: '
  221. Xtime compress < $1 > try.Z
  222. Xecho -n '5. uncompress time: '
  223. Xtime uncompress < try.Z > try.Z.U
  224. Xecho '6. comparing: (should not produce further output)'
  225. Xcmp try.Z.U $1
  226. Xecho '7. file sizes:'
  227. Xls -lds $1 try.AP try.Z
  228. Xecho '8. percentages: '
  229. Xecho -n 'AP to original: '; expr `wc -c < try.AP` '*' 100 / `wc -c < $1`
  230. Xecho -n 'Z to original: '; expr `wc -c < try.Z` '*' 100 / `wc -c < $1`
  231. Xecho -n 'AP to Z: '; expr `wc -c < try.AP` '*' 100 / `wc -c < try.Z`
  232. Xrm -f try.AP try.Z try.AP.U try.Z.U
  233. END_OF_FILE
  234.   if test 770 -ne `wc -c <'tryap'`; then
  235.     echo shar: \"'tryap'\" unpacked with wrong size!
  236.   fi
  237.   chmod +x 'tryap'
  238.   # end of 'tryap'
  239. fi
  240. if test -f 'tryapy' -a "${1}" != "-c" ; then 
  241.   echo shar: Will not clobber existing file \"'tryapy'\"
  242. else
  243.   echo shar: Extracting \"'tryapy'\" \(1184 characters\)
  244.   sed "s/^X//" >'tryapy' <<'END_OF_FILE'
  245. X#!/bin/csh -f
  246. X# Public domain.
  247. X./whap < /dev/null > /dev/null
  248. Xdate
  249. Xecho -n '1. yabba time: '
  250. Xtime ./yabba < $1 > try.Y
  251. Xecho -n '2. unyabba time: '
  252. Xtime ./unyabba < try.Y > try.Y.U
  253. Xecho '3. comparing: (should not produce further output)'
  254. Xcmp try.Y.U $1
  255. Xecho -n '4. whap time: '
  256. Xtime ./whap -q < $1 > try.AP
  257. Xecho -n '5. unwhap time: '
  258. Xtime ./unwhap -q < try.AP > try.AP.U
  259. Xecho '6. comparing: (should not produce further output)'
  260. Xcmp try.AP.U $1
  261. Xecho -n '7. compress time: '
  262. Xtime compress < $1 > try.Z
  263. Xecho -n '8. uncompress time: '
  264. Xtime uncompress < try.Z > try.Z.U
  265. Xecho '9. comparing: (should not produce further output)'
  266. Xcmp try.Z.U $1
  267. Xecho '10. file sizes:'
  268. Xls -lds $1 try.Y try.AP try.Z
  269. Xecho '11. percentages: '
  270. Xecho -n 'Y to original: '; expr `wc -c < try.Y` '*' 100 / `wc -c < $1`
  271. Xecho -n 'AP to original: '; expr `wc -c < try.AP` '*' 100 / `wc -c < $1`
  272. Xecho -n 'Z to original: '; expr `wc -c < try.Z` '*' 100 / `wc -c < $1`
  273. Xecho -n 'Y to AP: '; expr `wc -c < try.Y` '*' 100 / `wc -c < try.AP`
  274. Xecho -n 'Y to Z: '; expr `wc -c < try.Y` '*' 100 / `wc -c < try.Z`
  275. Xecho -n 'AP to Z: '; expr `wc -c < try.AP` '*' 100 / `wc -c < try.Z`
  276. Xrm -f try.AP try.Z try.AP.U try.Z.U try.Y try.Y.U
  277. END_OF_FILE
  278.   if test 1184 -ne `wc -c <'tryapy'`; then
  279.     echo shar: \"'tryapy'\" unpacked with wrong size!
  280.   fi
  281.   chmod +x 'tryapy'
  282.   # end of 'tryapy'
  283. fi
  284. echo shar: End of archive 4 \(of 4\).
  285. cp /dev/null ark4isdone
  286. MISSING=""
  287. for I in 1 2 3 4 ; do
  288.     if test ! -f ark${I}isdone ; then
  289.     MISSING="${MISSING} ${I}"
  290.     fi
  291. done
  292. if test "${MISSING}" = "" ; then
  293.     echo You have unpacked all 4 archives.
  294.     rm -f ark[1-9]isdone
  295. else
  296.     echo You still must unpack the following archives:
  297.     echo "        " ${MISSING}
  298. fi
  299. exit 0
  300. exit 0 # Just in case...
  301.